package com.tfxy.hxl.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 课程信息实体类
 * 
 * @author tfxy
 * @since 2024-01-01
 */
@Data
@TableName("course")
@Schema(description = "课程信息")
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 课程ID
     */
    @TableId(type = IdType.AUTO)
    @Schema(description = "课程ID")
    private Long id;

    /**
     * 课程标题
     */
    @Schema(description = "课程标题")
    private String title;

    /**
     * 课程描述
     */
    @Schema(description = "课程描述")
    private String description;

    /**
     * 分类ID
     */
    @Schema(description = "分类ID")
    private Long categoryId;

    /**
     * 教练姓名
     */
    @Schema(description = "教练姓名")
    private String instructor;

    /**
     * 课程时长（分钟）
     */
    @Schema(description = "课程时长（分钟）")
    private Integer duration;

    /**
     * 难度等级：1-初级，2-中级，3-高级
     */
    @Schema(description = "难度等级：1-初级，2-中级，3-高级")
    private Integer difficultyLevel;

    /**
     * 最大参与人数
     */
    @Schema(description = "最大参与人数")
    private Integer maxParticipants;

    /**
     * 课程价格
     */
    @Schema(description = "课程价格")
    private BigDecimal price;

    /**
     * 封面图片URL
     */
    @Schema(description = "封面图片URL")
    private String coverImage;

    /**
     * 视频URL
     */
    @Schema(description = "视频URL")
    private String videoUrl;

    /**
     * 标签（逗号分隔）
     */
    @Schema(description = "标签（逗号分隔）")
    private String tags;

    /**
     * 平均评分
     */
    @Schema(description = "平均评分")
    private BigDecimal rating;

    /**
     * 评分人数
     */
    @Schema(description = "评分人数")
    private Integer ratingCount;

    /**
     * 浏览次数
     */
    @Schema(description = "浏览次数")
    private Integer viewCount;

    /**
     * 报名次数
     */
    @Schema(description = "报名次数")
    private Integer enrollCount;

    /**
     * 状态：1-上架，0-下架
     */
    @Schema(description = "状态：1-上架，0-下架")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private Date updateTime;

    /**
     * 逻辑删除：0-未删除，1-已删除
     */
    @TableLogic
    @Schema(description = "逻辑删除：0-未删除，1-已删除")
    private Integer deleted;
}
